<include file="__THEME__/header" />

<link href="../Public/basic.css" rel="stylesheet" type="text/css" />

<!--日期-->
<script  type="text/javascript" src="__PUBLIC__/js/rcalendar.js" ></script>
<!--所在城市-->
<script type="text/javascript" src="__PUBLIC__/js/form_check/jquery.validator.reg.js"></script>
<script type="text/javascript" src="__PUBLIC__/js/form_check/jquery.corners.min.js"></script>

<!--本页-->
<script type="text/javascript" src="../Public/reg.js" ></script>

<div class="content"><!-- 内容 begin  -->

    <include file="__THEME__/apps" />

<php>$info['area'] = getAreaInfo("$info[current_province],$info[current_city]");</php>
<php>$info['hometown'] = getAreaInfo("$info[home_province],$info[home_city]");</php>
<php>$birthday = explode('-',$info['birthday']);</php>
 
    <div class="main"> <!-- 右侧内容 begin  -->
        <div class=page_title> <!-- page_title begin -->
            <h2><img src="../Public/images/contacts.gif" />修改资料</h2>
        <div class="c"></div>
</div><!-- page_title end -->
        <div class="tab-menu"><!-- 切换标签 begin  -->
            <ul>
                <li><a href="__URL__" class="on"><span>基本资料</span></a></li>
                <li><a href="__URL__/intro"><span>个人情况</span></a></li>
                <li><a href="__URL__/contact"><span>联系方式</span></a></li>
                <li><a href="__URL__/education"><span>教育情况</span></a></li>
                <li><a href="__URL__/career"><span>工作情况</span></a></li>
                <li><a href="__URL__/face"><span>上传头像</span></a></li>
            </ul>
        </div><!-- 切换标签 end  -->
        <div class="data"><!-- 基本资料 begin  -->
         <br/>
            <php>if($_GET["t"] == 1){</php><center><b><font color="red">修改成功！</font></b></center> <php>}</php>
            <ul>
                <form action="__URL__/doIndex" method="post" class="form_validator" id="regform">

                <li class="btmline mb10 cGray2"><div class="left alR" style="width: 15%;">&nbsp;</div><div class="left" style="width: 50%;">&nbsp;</div><div class="left" style="width: 20%;">谁可以看见</div><div class="left" style="width: 15%;">在首页显示</div></li>
                <li>
                    <div class="left alR" style="width: 15%;">姓名：</div>
                    <div class="left" style="width: 50%;">
                      <div class="left mr5"><input   require="true" datatype="limit|ajax" min="6" max="12" url="__APP__/Index/checkRealName" msg="请输入真实姓名|请输入真实姓名!" type="text" class="TextH20" style="width:200px;" onfocus="this.className='Text2'" onblur="this.className='TextH20'"  name="name" value="<?php echo $info['name']; ?>" dataType="LimitB" msg="姓名不能为空"/></div>
                      <div class="left"> 
                          <div id="success_name"  style="display:none;"> 
                              <span><img src="../Public/images/fzcg_dh[1].gif" /></span> 
                          </div> 
                          <div class="r error_name" style="position: relative;display:none;"> 
                                  <span><img src="../Public/images/th_ju[1].gif" class="alM"/></span> 
                                  <span id="error_name" class="cRed"></span>
                          </div> 
                      </div> 
                    </div>

                    <div class="left" style="width: 20%;">
                        <select  disabled="disabled">
                            <option value="0">任何人</option>
                            <option value="1">仅好友</option>
                            <option value="2">私密</option>
                            谁可以看见
                     </select>
                     <input type="hidden" name="__privacy_name" value ="0">
                    </div><div class="left" style="width: 15%;">
                        <input name="" type="checkbox" value="" checked="checked" disabled="disabled" />
                        <input type="hidden" name="__display_name" value ="1">
                    </div>
                </li>
                <li>
                    <div class="left alR" style="width: 15%;">性别：</div><div class="left" style="width: 50%;">
                        <label><input name="sex" type="radio" value="1" <php>if($info["sex"] == 1){</php> checked="true" <php>}</php>/> 男</label> &nbsp;&nbsp;&nbsp;
                        <label><input name="sex" type="radio" value="0" <php>if($info["sex"] == 0){</php> checked="true" <php>}</php> dataType="Group"  msg="必须选定一个性别" /> 女</label>
                    </div>
                    <div class="left" style="width: 20%;">
                        <select name="" disabled="disabled">
                            <option value="0">任何人</option>
                            <option value="1">仅好友</option>
                            <option value="2">私密</option>
                            谁可以看见
                    </select>
                    <input type="hidden" name="__privacy_sex" value ="0">
                    </div><div class="left" style="width: 15%;">
                    <input name="__display_sex" type="checkbox" value="1" <php>if($display["sex"] == 1){</php> checked="true" <php>}</php>/></div>
                </li>
                <li>
                    <div class="left alR" style="width: 15%;">出生日期：</div>                       
                    <div class="left" style="width: 50%;">
                                              <select name="birthday_year" id="birthday_year" >
                        	<php>for($i=1930;$i<=2009;$i++){</php>
                        		<php>if($i==$birthday[0]){</php>
                        			<option value="{$i}" selected="selected">{$i}</option>
                        		<php>}else{</php>
                        			<option value="{$i}" >{$i}</option>
                        		<php>}</php>
                        	<php>}</php>
                        </select>年 
                        <select name="birthday_month" id="birthday_month" >

                        	<php>for($i=1;$i<=12;$i++){</php>
                     			<php>if($i==$birthday[1]){</php>
                        			<option value="{$i}" selected="selected">{$i}</option>
                        		<php>}else{</php>
                        			<option value="{$i}">{$i}</option>
                        		<php>}</php>
                        	<php>}</php>
                        </select>月 
                        <select name="birthday_day" id="birthday_day" >
                        	<php>for($i=1;$i<=31;$i++){</php>
                     			<php>if($i==$birthday[2]){</php>
                        			<option value="{$i}" selected="selected">{$i}</option>
                        		<php>}else{</php>
                        			<option value="{$i}">{$i}</option>
                        		<php>}</php>
                        	<php>}</php>
                        </select>日
                   </div>
                    <div class="left" style="width: 20%;"><select name="__privacy_birthday">
                            <option value="0"  <php>if($privacy["birthday"] == 0){</php> selected='true' <php>}</php>>任何人</option>
                            <option value="1"  <php>if($privacy["birthday"] == 1){</php> selected='true' <php>}</php>>仅好友</option>
                            <option value="2"  <php>if($privacy["birthday"] == 2){</php> selected='true' <php>}</php>>私密</option>
                            谁可以看见
                    </select></div><div class="left" style="width: 15%;">
                        <input name="__display_birthday" type="checkbox" value="1" <php>if($display["birthday"] == 1){</php> checked="true" <php>}</php> /></div>
                </li>
                <!--
                <li>
                    <div class="left alR" style="width: 15%;">星座：</div>                       
                    <div class="left" style="width: 50%;"><select name="birthday_stro" disabled><option id="astro">&nbsp;</option></select>                   </div>
                    <div class="left" style="width: 20%;"><select name="__privacy_birthday">
                            <option value="0"  <php>if($privacy["birthday"] == 0){</php> selected='true' <php>}</php>>任何人</option>
                            <option value="1"  <php>if($privacy["birthday"] == 1){</php> selected='true' <php>}</php>>仅好友</option>
                            <option value="2"  <php>if($privacy["birthday"] == 2){</php> selected='true' <php>}</php>>私密</option>
                            谁可以看见
                    </select></div><div class="left" style="width: 15%;">
                        <input name="__display_birthday" type="checkbox" value="1" <php>if($display["birthday"] == 1){</php> checked="true" <php>}</php> /></div>
                </li>
                -->

                <!--<li>
                    <div class="left alR" style="width: 15%;">目前身份：</div><div class="left" style="width: 50%;">
                        <label>
                            <input name="status" type="radio" value="2"  onclick="work_check();" <php>if($info["status"] == 2){</php>  checked="true" <php>}</php>/>已工作
                        </label>　
                        <label>
                            <input  name="status" value="1" type="radio" onclick="school_check();" <php>if($info["status"] == 1){</php> checked="true" <php>}</php>/>学生
                        </label>
                        <label>
                            <input  name="status" value="0" type="radio"  onclick="other_check();" <php>if($info["status"] == 0){</php> checked="true" <php>}</php>/> 其他
                        </label>
                        <script>
                            $(function () {
                                    <php>
                                    switch($info["status"]){
                                    case 0: echo "other_check();";  break;
                                    case 1: echo "school_check();";  break;
                                    case 2: echo "work_check();";  break;
                                }
                                    </php>
                                });

                        </script>

                    </div>
                    <div class="left" style="width: 20%;">
                        <select name="__privacy_status">
                            <option value="0"  <php>if($privacy["status"] == 0){</php> echo 'selected=true'; <php>}</php>>任何人</option>
                            <option value="1"  <php>if($privacy["status"] == 1){</php> echo 'selected=true'; <php>}</php>>仅好友</option>
                            <option value="2"  <php>if($privacy["status"] == 2){</php> echo 'selected=true'; <php>}</php>>私密</option>
                            谁可以看见
                    </select></div><div class="left" style="width: 15%;">
                        <input name="__display_status" type="checkbox" value="1" <php>if($display["status"] == 1){</php> checked="true" <php>}</php>/></div>
                </li>

                <li style="display:none;" id="work_check" class="the_check">
                    <div class="left alR" style="width: 15%;">工作单位：</div><div class="left" style="width: 50%;">
                        <input id="work_name" type="text" class="text1" style="width:250px;" onBlur="this.className='text1'" onFocus="this.className='text2'" name="company" value="{$info.company}"/>
                    </div>
                    <div class="left" style="width: 20%;"></div>
                    <div class="left" style="width: 15%;"></div>
                </li>
                <li style="display:none;" id="school_check" class="the_check">
                    <div class="left alR" style="width: 15%;">所在学校：</div><div class="left" style="width: 50%;">
                        <input type="text" class="text1" style="width:250px;" onBlur="this.className='text1'" onFocus="this.className='text2'" onclick="$.facebox.popup('请选择大学','__URL__/school');" name="school"  id="school_name" value="{$info.shool}"/>
                    </div>
                    <div class="left" style="width: 20%;"></div>
                    <div class="left" style="width: 15%;"></div>
                </li>

                -->
                <li>
                    <div class="left alR" style="width: 15%;">居住城市：</div><div class="left" style="width: 50%;">
                                        <input type="hidden" name="ts_areaval" id="ts_areaval" value="{$info.ts_areaval}"/>
						<input type="text" class="TextH20" style="width:200px;" onfocus="this.className='Text2'" onblur="this.className='TextH20'" value="{$info.area}" name="areaval" disabled  id="areaval" /> <input type="button" class="btn_b" value="选择地区" selectArea="true" level="2" areatype="areaval" >

                   </div>
                    <div class="left" style="width: 20%;">
                        <select name="__privacy_ts_areaval">
                            <option value="0" <php>if($privacy["ts_areaval"] == 0){</php> selected="true" <php>}</php>>任何人</option>
                            <option value="1" <php>if($privacy["ts_areaval"] == 1){</php> selected="true" <php>}</php>>仅好友</option>
                            <option value="2" <php>if($privacy["ts_areaval"] == 2){</php> selected="true" <php>}</php>>私密</option>
                            谁可以看见
                    </select></div><div class="left" style="width: 15%;">
                        <input name="__display_ts_areaval" type="checkbox" value="1"  <php>if($display["ts_areaval"] == 1){</php> checked="true" <php>}</php>/></div>
                </li>

                <li>
                    <div class="left alR" style="width: 15%;">血型：</div>
                        <div class="left" style="width: 50%;">
                        	<select name="bloodtype" id="bloodtype">
                        		<option value = '请选择'>请选择</option>
                        		<option value="O型">O型</option>
                        		<option value="A型">A型</option>
                        		<option value="B型">B型</option>
                        		<option value="AB型">AB型</option>
                        		<option value="稀有血型">稀有血型</option>
                        	</select>    
                   		</div>
                    <div class="left" style="width: 20%;">
                        <select name="__privacy_bloodtype">
                            <option value="0" <php>if($privacy["bloodtype"] == 0){</php> selected="true" <php>}</php>>任何人</option>
                            <option value="1" <php>if($privacy["bloodtype"] == 1){</php> selected="true" <php>}</php>>仅好友</option>
                            <option value="2" <php>if($privacy["bloodtype"] == 2){</php> selected="true" <php>}</php>>私密</option>
                            谁可以看见
                    </select></div><div class="left" style="width: 15%;">
                        <input name="__display_bloodtype" type="checkbox" value="1"  <php>if($display["bloodtype"] == 1){</php> checked="true" <php>}</php>/></div>
                </li>                

                <li>
                    <div class="left alR" style="width: 15%;">家乡：</div><div class="left" style="width: 50%;">
                                        <input type="hidden" name="ts_hometown" id="ts_hometown" value="{$info.ts_hometown}"/>
						<input type="text" class="TextH20" style="width:200px;" onfocus="this.className='Text2'" onblur="this.className='TextH20'" value="{$info.hometown}"  disabled name="hometown" id="hometown"/>  <input type="button" class="btn_b" value="选择地区" selectArea="true" level="2" areatype="hometown" >

                   </div>
                    <div class="left" style="width: 20%;">
                        <select name="__privacy_ts_hometown">
                            <option value="0" <php>if($privacy["ts_hometown"] == 0){</php> selected="true" <php>}</php>>任何人</option>
                            <option value="1" <php>if($privacy["ts_hometown"] == 1){</php> selected="true" <php>}</php>>仅好友</option>
                            <option value="2" <php>if($privacy["ts_hometown"] == 2){</php> selected="true" <php>}</php>>私密</option>
                            谁可以看见
                    </select></div><div class="left" style="width: 15%;">
                        <input name="__display_ts_hometown" type="checkbox" value="1"  <php>if($display["ts_hometown"] == 1){</php> checked="true" <php>}</php>/></div>
                </li>


                <li><div class="left alR" style="width: 15%;">&nbsp;</div><div class="left" style="width: 50%;"><input type="submit" class="btn_b" value="保存修改" />
                </div><div class="left" style="width: 20%;">&nbsp;</div><div class="left" style="width: 15%;">&nbsp;</div></li>
            </form> 
           </ul>


        </div><!-- 基本资料 end  -->







<script>
$(document).ready(function()
{
	var bithday='{$info.birthday}'.split('-');
	var v_astro = getAstro(bithday[1],bithday[2]);
	$("#astro").html(v_astro);
	$("#astro").val(v_astro);
});


function adjustAstro()
{
	var Month = $('#birthday_month').val();
	var day = $('#birthday_day').val();	
	var v_astro = getAstro(Month,day);
	$("#astro").html(v_astro);
	$("#astro").val(v_astro);
}


function getAstro(v_month, v_day)
{
//	v_month = parseInt(v_month , 10)
//	v_day = parseInt(v_day , 10);
	
	if ((v_month == 12 && v_day >= 22)
		|| (v_month == 1 && v_day <= 20))
	{
		return "魔羯座";
	}
	else if ((v_month == 1 && v_day >= 21)
		|| (v_month == 2 && v_day <= 19))
	{
		return "水瓶座";
	}
	else if ((v_month == 2 && v_day >= 20)
		|| (v_month == 3 && v_day <= 20))
	{
		return "双鱼座";
	}
	else if ((v_month == 3 && v_day >= 21)
		|| (v_month == 4 && v_day <= 20))
	{
		return "白羊座";
	}
	else if ((v_month == 4 && v_day >= 21)
		|| (v_month == 5 && v_day <= 21))
	{
		return "金牛座";
	}
	else if ((v_month == 5 && v_day >= 22)
		|| (v_month == 6 && v_day <= 21))
	{
		return "双子座";
	}
	else if ((v_month == 6 && v_day >= 22)
		|| (v_month == 7 && v_day <= 22))
	{
		return "巨蟹座";
	}
	else if ((v_month == 7 && v_day >= 23)
		|| (v_month == 8 && v_day <= 23))
	{
		return "狮子座";
	}
	else if ((v_month == 8 && v_day >= 24)
		|| (v_month == 9 && v_day <= 23))
	{
		return "处女座";
	}
	else if ((v_month == 9 && v_day >= 24)
		|| (v_month == 10 && v_day <= 23))
	{
		return "天秤座";
	}
	else if ((v_month == 10 && v_day >= 24)
		|| (v_month == 11 && v_day <= 22))
	{
		return "天蝎座";
	}
	else if ((v_month == 11 && v_day >= 23)
		|| (v_month == 12 && v_day <= 21))
	{
		return "射手座";
	}
	return "";
}

$("#bloodtype option[value='{$info['bloodtype']}']").attr('selected',true);
</script>
    </div><!-- 右侧内容 end  -->

<div class="c"></div>
</div><!-- 内容 end -->
<include file="__THEME__/footer" />

{:W('Network')}